//
//  showInfo.m
//  MobileGPS
//
//  Created by wangweike on 14-8-27.
//  Copyright (c) 2014年 Ruluo. All rights reserved.
//

#import "showInfo.h"

@implementation showInfo
+(id)shareinfomation
{
    static showInfo * info=nil;
    @synchronized(self){
        if (info==nil) {
            info=[[showInfo alloc] init];
        }
    }
    return info;
}

-(void)showLoading:(NSString*)loadText Target:(id)targetView
{
    _hud=[MBProgressHUD showHUDAddedTo:targetView animated:YES];
    _hud.color = [UIColor colorWithRed:0.23 green:0.50 blue:0.82 alpha:0.5];
    _hud.dimBackground=YES;
    _hud.labelText=loadText;
    [_hud show:YES];
}

-(void)showMessage:(NSString*)message Target:(id)targetView
{
    _hud = [MBProgressHUD showHUDAddedTo:targetView animated:YES];
	_hud.mode = MBProgressHUDModeText;
	_hud.labelText =message;
	_hud.margin = 10.f;
	_hud.yOffset = 150.f;
    _hud.labelColor=[UIColor blackColor];
	_hud.removeFromSuperViewOnHide = YES;
    [_hud hide:YES afterDelay:3];
}

-(void)dealloc
{
    self.hud=nil;
}

@end
